Skip to content

feat: Support cos_sin_cache in all cases. - #3517

Merged
yuxianq merged 4 commits into
NVIDIA:mainfrom
yuxianq:refactor-rope
Apr 16, 2025
Merged

yuxianq merged 4 commits into
NVIDIA:mainfrom
yuxianq:refactor-rope

Conversation

@yuxianq

@yuxianq yuxianq commented Apr 14, 2025

Copy link
Copy Markdown
Collaborator

This MR contains the following updates:

  1. Handle fuse_pos_embd=True/False and create RotaryEmbedding inside attention module, so that the users don't need to handle it in the modeling files.
  2. Cache cos_sin for unfused rope implementation. If flashinfer is available, use apply_rope_with_cos_sin_cache_inplace instead of apply_rope_inplace. Otherwise, we fallback to pure pytorch implementation, which can support any rope now.

@yuxianq
yuxianq requested review from QiJune, hlu1, kaiyux and litaotju April 14, 2025 04:17
@yuxianq

yuxianq commented Apr 14, 2025

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #2109 [ run ] triggered by Bot

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #2109 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #1538 completed with status: 'FAILURE'

yuxianq added 2 commits April 15, 2025 07:12
Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
@yuxianq

yuxianq commented Apr 15, 2025

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #2291 [ run ] triggered by Bot

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #2291 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #1647 completed with status: 'FAILURE'

Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
@yuxianq

yuxianq commented Apr 15, 2025

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #2332 [ run ] triggered by Bot

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #2332 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #1679 completed with status: 'SUCCESS'

@yuxianq
yuxianq enabled auto-merge (squash) April 16, 2025 05:36
@yuxianq

yuxianq commented Apr 16, 2025

Copy link
Copy Markdown
Collaborator Author

/bot reuse-pipeline

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #2422 [ reuse-pipeline ] triggered by Bot

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #2422 [ reuse-pipeline ] completed with state SUCCESS
Reusing PR_Github #2332 for commit 54a3b4d

@yuxianq
yuxianq merged commit fd8ded2 into NVIDIA:main Apr 16, 2025
wu1du2 pushed a commit to wu1du2/TensorRT-LLM that referenced this pull request May 11, 2025
Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants